home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / taropyon / silib / inc / sirgs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  2.1 KB  |  83 lines

  1. #ifndef    _SIRGS_H
  2. #define    _SIRGS_H
  3.  
  4. #ifndef    CONST
  5. #    define    CONST    const
  6. #endif
  7.  
  8. #define    RGS_ID        "RGSLIB"
  9. #define    RGS_VERSION    0x0101
  10. #define    RGS_EDITION    0x0000
  11.  
  12. typedef struct        /* ライブラリ環境    */
  13. {
  14.     void     *(*malloc)(size_t);
  15.     void      (*free)(void *);
  16.     char       *path;                /* 検索パス    */
  17. } RGSCFG_T;
  18.  
  19. typedef struct _rgsdat_t
  20. {
  21.     struct _rgsdat_t       *next;
  22.     unsigned short            att;
  23.     unsigned short            stt;
  24.     int                        link;    /* リンクレベル    */
  25.     char                   *name;
  26.     void                   *ptr;
  27. } RGSDAT_T;
  28.  
  29. typedef struct _rgsfnc_t
  30. {
  31.     struct _rgsfnc_t       *next;
  32.     unsigned short            att;
  33.     unsigned short            stt;
  34.     int                        link;    /* リンクレベル    */
  35.     char                   *name;
  36.     int                      (*func)();
  37. } RGSFNC_T;
  38.  
  39. typedef struct _rgspara_t
  40. {
  41.     char            id[8];
  42.     short            version;
  43.     short            edition;
  44.  
  45.     int              (*funcEntry)(struct _rgspara_t *);
  46.     int              (*funcTerm )(struct _rgspara_t *);
  47.     int              (*funcMain )(int,char **);
  48.     int              (*funcExec )();
  49.  
  50.     RGSDAT_T     *(*RGS_datGet   )(CONST char *);
  51.     int              (*RGS_datSet   )(CONST char *, void *);
  52.     int              (*RGS_datUnset )(CONST char *);
  53.     int              (*RGS_datLink  )(CONST char *);
  54.     int              (*RGS_datUnlink)(CONST char *);
  55.     RGSFNC_T     *(*RGS_fncGet   )(CONST char *);
  56.     int              (*RGS_fncSet   )(CONST char *, int (*func)());
  57.     int              (*RGS_fncUnset )(CONST char *);
  58.     int              (*RGS_fncLink  )(CONST char *);
  59.     int              (*RGS_fncUnlink)(CONST char *);
  60. } RGSPARA_T;
  61.  
  62. extern RGSCFG_T    RgsCfg;
  63.  
  64. extern RGSDAT_T       *RGS_datGet( CONST char *name );
  65. extern int            RGS_datSet( CONST char *name, void *ptr );
  66. extern int            RGS_datUnset( CONST char *name );
  67. extern int            RGS_datLink( CONST char *name );
  68. extern int            RGS_datUnlink( CONST char *name );
  69.  
  70. extern RGSFNC_T       *RGS_fncGet( CONST char *name );
  71. extern int            RGS_fncSet( CONST char *name, int (*func)() );
  72. extern int            RGS_fncUnset( CONST char *name );
  73. extern int            RGS_fncLink( CONST char *name );
  74. extern int            RGS_fncUnlink( CONST char *name );
  75.  
  76. extern RGSPARA_T   *RGS_paraAlloc(void *entry);
  77. extern void            RGS_paraFree( RGSPARA_T *rgspara );
  78.  
  79. extern int            RGS_setSearchPath( CONST char *path );
  80. extern int            RGS_load(CONST char *fn, char **ptr, char **entry);
  81.  
  82. #endif
  83.